package com.kehutong.wxapi.response;

import org.coraframework.json.JSON;
import org.coraframework.json.annotation.JSONField;

import java.util.List;

/**
 * 批量获取客户详情响应
 * @author: liukunlong
 * @date: 2021-03-04 15:11
 */
public class BatchGetByUserResponse {
    public static void main(String[] args) {
        String json="{\n" +
                "   \"errcode\": 0,\n" +
                "   \"errmsg\": \"ok\",\n" +
                "   \"external_contact_list\":\n" +
                "    [\n" +
                "        {\n" +
                "            \"external_contact\":\n" +
                "            {\n" +
                "                \"external_userid\":\"woAJ2GCAAAXtWyujaWJHDDGi0mACHAAA\",\n" +
                "                \"name\":\"李四\",\n" +
                "                \"position\":\"Manager\",\n" +
                "                \"avatar\":\"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0\",\n" +
                "                \"corp_name\":\"腾讯\",\n" +
                "                \"corp_full_name\":\"腾讯科技有限公司\",\n" +
                "                \"type\":2,\n" +
                "                \"gender\":1,\n" +
                "                \"unionid\":\"ozynqsulJFCZ2z1aYeS8h-nuasdAAA\",\n" +
                "                \"external_profile\":\n" +
                "                {\n" +
                "                 \"external_attr\":\n" +
                "                  [\n" +
                "                      {\n" +
                "                      \"type\":0,\n" +
                "                      \"name\":\"文本名称\",\n" +
                "                       \"text\":\n" +
                "                        {\n" +
                "                           \"value\":\"文本\"\n" +
                "                        }\n" +
                "                      },\n" +
                "                      {\n" +
                "                      \"type\":1,\n" +
                "                      \"name\":\"网页名称\",\n" +
                "                      \"web\":\n" +
                "                      {\n" +
                "                      \"url\":\"http://www.test.com\",\n" +
                "                      \"title\":\"标题\"\n" +
                "                      }\n" +
                "                },\n" +
                "                {\n" +
                "                  \"type\":2,\n" +
                "                  \"name\":\"测试app\",\n" +
                "                  \"miniprogram\":\n" +
                "                  {\n" +
                "                      \"appid\": \"wx8bd80126147df384\",\n" +
                "                      \"pagepath\": \"/index\",\n" +
                "                      \"title\": \"my miniprogram\"\n" +
                "                  }\n" +
                "                }\n" +
                "              ]\n" +
                "             }\n" +
                "            },\n" +
                "            \"follow_info\":\n" +
                "            {\n" +
                "                \"remark\":\"李部长\",\n" +
                "                \"description\":\"对接采购事务\",\n" +
                "                \"createtime\":1525779812,\n" +
                "                \"tag_id\":[\"etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA\"],\n" +
                "                \"remark_corp_name\":\"腾讯科技\",\n" +
                "                \"remark_mobiles\":\n" +
                "                [\n" +
                "                      \"13800000001\",\n" +
                "                      \"13000000002\"\n" +
                "                ],\n" +
                "                \"oper_userid\":\"rocky\",\n" +
                "                \"add_way\":1\n" +
                "            }\n" +
                "        },\n" +
                "        {\n" +
                "            \"external_contact\":\n" +
                "             {\n" +
                "                \"external_userid\":\"woAJ2GCAAAXtWyujaWJHDDGi0mACHBBB\",\n" +
                "                \"name\":\"王五\",\n" +
                "                \"position\":\"Engineer\",\n" +
                "                \"avatar\":\"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0\",\n" +
                "                \"corp_name\":\"腾讯\",\n" +
                "                \"corp_full_name\":\"腾讯科技有限公司\",\n" +
                "                \"type\":2,\n" +
                "                \"gender\":1,\n" +
                "                \"unionid\":\"ozynqsulJFCZ2asdaf8h-nuasdAAA\"\n" +
                "             },\n" +
                "            \"follow_info\":\n" +
                "            {\n" +
                "                \"remark\":\"王助理\",\n" +
                "                \"description\":\"采购问题咨询\",\n" +
                "                \"createtime\":1525881637,\n" +
                "                \"tag_id\":[\"etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA\"],\n" +
                "                \"state\":\"外联二维码1\",\n" +
                "                \"oper_userid\":\"woAJ2GCAAAd1asdasdjO4wKmE8AabjBBB\",\n" +
                "                \"add_way\":3\n" +
                "            }\n" +
                "        }\n" +
                "    ],\n" +
                "    \"next_cursor\":\"r9FqSqsI8fgNbHLHE5QoCP50UIg2cFQbfma3l2QsmwI\"\n" +
                "}\n";
        BatchGetByUserResponse pp = JSON.parseObject(json, BatchGetByUserResponse.class);
        System.out.println(pp.getExternalContactList().get(0).getExternalContact().getName());
    }

    /**
     * errcode
     */ /**
     * errcode : 0
     * errmsg : ok
     * external_contact_list : [{"external_contact":{"external_userid":"woAJ2GCAAAXtWyujaWJHDDGi0mACHAAA","name":"李四","position":"Manager","avatar":"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0","corp_name":"腾讯","corp_full_name":"腾讯科技有限公司","type":2,"gender":1,"unionid":"ozynqsulJFCZ2z1aYeS8h-nuasdAAA","external_profile":{"external_attr":[{"type":0,"name":"文本名称","text":{"value":"文本"}},{"type":1,"name":"网页名称","web":{"url":"http://www.test.com","title":"标题"}},{"type":2,"name":"测试app","miniprogram":{"appid":"wx8bd80126147df384","pagepath":"/index","title":"my miniprogram"}}]}},"follow_info":{"remark":"李部长","description":"对接采购事务","createtime":1525779812,"tag_id":["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA"],"remark_corp_name":"腾讯科技","remark_mobiles":["13800000001","13000000002"],"oper_userid":"rocky","add_way":1}},{"external_contact":{"external_userid":"woAJ2GCAAAXtWyujaWJHDDGi0mACHBBB","name":"王五","position":"Engineer","avatar":"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0","corp_name":"腾讯","corp_full_name":"腾讯科技有限公司","type":2,"gender":1,"unionid":"ozynqsulJFCZ2asdaf8h-nuasdAAA"},"follow_info":{"remark":"王助理","description":"采购问题咨询","createtime":1525881637,"tag_id":["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA"],"state":"外联二维码1","oper_userid":"woAJ2GCAAAd1asdasdjO4wKmE8AabjBBB","add_way":3}}]
     * next_cursor : r9FqSqsI8fgNbHLHE5QoCP50UIg2cFQbfma3l2QsmwI
     */

    @JSONField(name = "errcode")
    private Integer errcode;
    /**
     * errmsg
     */
    @JSONField(name = "errmsg")
    private String errmsg;
    /**
     * externalContactList
     */
    @JSONField(name = "external_contact_list")
    private List<ExternalContactListDTO> externalContactList;
    /**
     * nextCursor
     */
    @JSONField(name = "next_cursor")
    private String nextCursor;

    public Integer getErrcode() {
        return errcode;
    }

    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public List<ExternalContactListDTO> getExternalContactList() {
        return externalContactList;
    }

    public void setExternalContactList(List<ExternalContactListDTO> externalContactList) {
        this.externalContactList = externalContactList;
    }

    public String getNextCursor() {
        return nextCursor;
    }

    public void setNextCursor(String nextCursor) {
        this.nextCursor = nextCursor;
    }

    public static class ExternalContactListDTO {
        /**
         * externalContact
         */ /**
         * external_contact : {"external_userid":"woAJ2GCAAAXtWyujaWJHDDGi0mACHAAA","name":"李四","position":"Manager","avatar":"http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0","corp_name":"腾讯","corp_full_name":"腾讯科技有限公司","type":2,"gender":1,"unionid":"ozynqsulJFCZ2z1aYeS8h-nuasdAAA","external_profile":{"external_attr":[{"type":0,"name":"文本名称","text":{"value":"文本"},"web":{"url":"http://www.test.com","title":"标题"},"miniprogram":{"appid":"wx8bd80126147df384","pagepath":"/index","title":"my miniprogram"}},{"type":1,"name":"网页名称","web":{"url":"http://www.test.com","title":"标题"}},{"type":2,"name":"测试app","miniprogram":{"appid":"wx8bd80126147df384","pagepath":"/index","title":"my miniprogram"}}]}}
         * follow_info : {"remark":"李部长","description":"对接采购事务","createtime":1525779812,"tag_id":["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA"],"remark_corp_name":"腾讯科技","remark_mobiles":["13800000001","13000000002"],"oper_userid":"rocky","add_way":1}
         */

        @JSONField(name = "external_contact")
        private ExternalContactDTO externalContact;
        /**
         * followInfo
         */
        @JSONField(name = "follow_info")
        private FollowInfoDTO followInfo;

        public ExternalContactDTO getExternalContact() {
            return externalContact;
        }

        public void setExternalContact(ExternalContactDTO externalContact) {
            this.externalContact = externalContact;
        }

        public FollowInfoDTO getFollowInfo() {
            return followInfo;
        }

        public void setFollowInfo(FollowInfoDTO followInfo) {
            this.followInfo = followInfo;
        }

        public static class ExternalContactDTO {
            /**
             * externalUserid
             */ /**
             * external_userid : woAJ2GCAAAXtWyujaWJHDDGi0mACHAAA
             * name : 李四
             * position : Manager
             * avatar : http://p.qlogo.cn/bizmail/IcsdgagqefergqerhewSdage/0
             * corp_name : 腾讯
             * corp_full_name : 腾讯科技有限公司
             * type : 2
             * gender : 1
             * unionid : ozynqsulJFCZ2z1aYeS8h-nuasdAAA
             * external_profile : {"external_attr":[{"type":0,"name":"文本名称","text":{"value":"文本"}},{"type":1,"name":"网页名称","web":{"url":"http://www.test.com","title":"标题"}},{"type":2,"name":"测试app","miniprogram":{"appid":"wx8bd80126147df384","pagepath":"/index","title":"my miniprogram"}}]}
             */

            @JSONField(name = "external_userid")
            private String externalUserid;
            /**
             * name
             */
            @JSONField(name = "name")
            private String name;
            /**
             * position
             */
            @JSONField(name = "position")
            private String position;
            /**
             * avatar
             */
            @JSONField(name = "avatar")
            private String avatar;
            /**
             * corpName
             */
            @JSONField(name = "corp_name")
            private String corpName;
            /**
             * corpFullName
             */
            @JSONField(name = "corp_full_name")
            private String corpFullName;
            /**
             * type
             */
            @JSONField(name = "type")
            private Integer type;
            /**
             * gender
             */
            @JSONField(name = "gender")
            private Integer gender;
            /**
             * unionid
             */
            @JSONField(name = "unionid")
            private String unionid;
            /**
             * externalProfile
             */
            @JSONField(name = "external_profile")
            private ExternalProfileDTO externalProfile;

            public String getExternalUserid() {
                return externalUserid;
            }

            public void setExternalUserid(String externalUserid) {
                this.externalUserid = externalUserid;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getPosition() {
                return position;
            }

            public void setPosition(String position) {
                this.position = position;
            }

            public String getAvatar() {
                return avatar;
            }

            public void setAvatar(String avatar) {
                this.avatar = avatar;
            }

            public String getCorpName() {
                return corpName;
            }

            public void setCorpName(String corpName) {
                this.corpName = corpName;
            }

            public String getCorpFullName() {
                return corpFullName;
            }

            public void setCorpFullName(String corpFullName) {
                this.corpFullName = corpFullName;
            }

            public Integer getType() {
                return type;
            }

            public void setType(Integer type) {
                this.type = type;
            }

            public Integer getGender() {
                return gender;
            }

            public void setGender(Integer gender) {
                this.gender = gender;
            }

            public String getUnionid() {
                return unionid;
            }

            public void setUnionid(String unionid) {
                this.unionid = unionid;
            }

            public ExternalProfileDTO getExternalProfile() {
                return externalProfile;
            }

            public void setExternalProfile(ExternalProfileDTO externalProfile) {
                this.externalProfile = externalProfile;
            }

            public static class ExternalProfileDTO {
                /**
                 * externalAttr
                 */
                @JSONField(name = "external_attr")
                private List<ExternalAttrDTO> externalAttr;

                public List<ExternalAttrDTO> getExternalAttr() {
                    return externalAttr;
                }

                public void setExternalAttr(List<ExternalAttrDTO> externalAttr) {
                    this.externalAttr = externalAttr;
                }

                public static class ExternalAttrDTO {
                    /**
                     * type
                     */ /**
                     * type : 0
                     * name : 文本名称
                     * text : {"value":"文本"}
                     * web : {"url":"http://www.test.com","title":"标题"}
                     * miniprogram : {"appid":"wx8bd80126147df384","pagepath":"/index","title":"my miniprogram"}
                     */

                    @JSONField(name = "type")
                    private Integer type;
                    /**
                     * name
                     */
                    @JSONField(name = "name")
                    private String name;
                    /**
                     * text
                     */
                    @JSONField(name = "text")
                    private TextDTO text;
                    /**
                     * web
                     */
                    @JSONField(name = "web")
                    private WebDTO web;
                    /**
                     * miniprogram
                     */
                    @JSONField(name = "miniprogram")
                    private MiniprogramDTO miniprogram;

                    public Integer getType() {
                        return type;
                    }

                    public void setType(Integer type) {
                        this.type = type;
                    }

                    public String getName() {
                        return name;
                    }

                    public void setName(String name) {
                        this.name = name;
                    }

                    public TextDTO getText() {
                        return text;
                    }

                    public void setText(TextDTO text) {
                        this.text = text;
                    }

                    public WebDTO getWeb() {
                        return web;
                    }

                    public void setWeb(WebDTO web) {
                        this.web = web;
                    }

                    public MiniprogramDTO getMiniprogram() {
                        return miniprogram;
                    }

                    public void setMiniprogram(MiniprogramDTO miniprogram) {
                        this.miniprogram = miniprogram;
                    }

                    public static class TextDTO {
                        /**
                         * value
                         */ /**
                         * value : 文本
                         */

                        @JSONField(name = "value")
                        private String value;

                        public String getValue() {
                            return value;
                        }

                        public void setValue(String value) {
                            this.value = value;
                        }
                    }

                    public static class WebDTO {
                        /**
                         * url
                         */ /**
                         * url : http://www.test.com
                         * title : 标题
                         */

                        @JSONField(name = "url")
                        private String url;
                        /**
                         * title
                         */
                        @JSONField(name = "title")
                        private String title;

                        public String getUrl() {
                            return url;
                        }

                        public void setUrl(String url) {
                            this.url = url;
                        }

                        public String getTitle() {
                            return title;
                        }

                        public void setTitle(String title) {
                            this.title = title;
                        }
                    }

                    public static class MiniprogramDTO {
                        /**
                         * appid
                         */ /**
                         * appid : wx8bd80126147df384
                         * pagepath : /index
                         * title : my miniprogram
                         */

                        @JSONField(name = "appid")
                        private String appid;
                        /**
                         * pagepath
                         */
                        @JSONField(name = "pagepath")
                        private String pagepath;
                        /**
                         * title
                         */
                        @JSONField(name = "title")
                        private String title;

                        public String getAppid() {
                            return appid;
                        }

                        public void setAppid(String appid) {
                            this.appid = appid;
                        }

                        public String getPagepath() {
                            return pagepath;
                        }

                        public void setPagepath(String pagepath) {
                            this.pagepath = pagepath;
                        }

                        public String getTitle() {
                            return title;
                        }

                        public void setTitle(String title) {
                            this.title = title;
                        }
                    }
                }
            }
        }

        public static class FollowInfoDTO {
            /**
             * remark
             */ /**
             * remark : 李部长
             * description : 对接采购事务
             * createtime : 1525779812
             * tag_id : ["etAJ2GCAAAXtWyujaWJHDDGi0mACHAAA"]
             * remark_corp_name : 腾讯科技
             * remark_mobiles : ["13800000001","13000000002"]
             * oper_userid : rocky
             * add_way : 1
             */

            @JSONField(name = "remark")
            private String remark;
            /**
             * description
             */
            @JSONField(name = "description")
            private String description;
            /**
             * createtime
             */
            @JSONField(name = "createtime")
            private Integer createtime;
            /**
             * tagId
             */
            @JSONField(name = "tag_id")
            private List<String> tagId;
            /**
             * remarkCorpName
             */
            @JSONField(name = "remark_corp_name")
            private String remarkCorpName;
            /**
             * remarkMobiles
             */
            @JSONField(name = "remark_mobiles")
            private List<String> remarkMobiles;
            /**
             * operUserid
             */
            @JSONField(name = "oper_userid")
            private String operUserid;
            /**
             * addWay
             */
            @JSONField(name = "add_way")
            private Integer addWay;

            public String getRemark() {
                return remark;
            }

            public void setRemark(String remark) {
                this.remark = remark;
            }

            public String getDescription() {
                return description;
            }

            public void setDescription(String description) {
                this.description = description;
            }

            public Integer getCreatetime() {
                return createtime;
            }

            public void setCreatetime(Integer createtime) {
                this.createtime = createtime;
            }

            public List<String> getTagId() {
                return tagId;
            }

            public void setTagId(List<String> tagId) {
                this.tagId = tagId;
            }

            public String getRemarkCorpName() {
                return remarkCorpName;
            }

            public void setRemarkCorpName(String remarkCorpName) {
                this.remarkCorpName = remarkCorpName;
            }

            public List<String> getRemarkMobiles() {
                return remarkMobiles;
            }

            public void setRemarkMobiles(List<String> remarkMobiles) {
                this.remarkMobiles = remarkMobiles;
            }

            public String getOperUserid() {
                return operUserid;
            }

            public void setOperUserid(String operUserid) {
                this.operUserid = operUserid;
            }

            public Integer getAddWay() {
                return addWay;
            }

            public void setAddWay(Integer addWay) {
                this.addWay = addWay;
            }
        }
    }
}
